#include "common.h"
#include <QVariant>
//#include <QQmlApplicationEngine>
#include <QQuickItem>
#include <QQmlComponent>
#include <QMessageBox>

Common::Common()
{

}

//====================Нестатичные модальные диалоги===============================
QString Common::russiantext(const char * msg){
    return QTextCodec::codecForName("UTF-8")->toUnicode(msg);
}
int Common::Error1(const char* msg1){
    QMessageBox msgBox;
    msgBox.setStandardButtons(QMessageBox::Ok);
    if(msg1 != nullptr){
        QString msg = russiantext(msg1);
        msgBox.setText(msg);
    }
    else msgBox.setText(russiantext("Строка не инициализирована."));
    int ret = msgBox.exec();
    return ret;
}
